import lejos.nxt.LCD;
import lejos.nxt.SensorPort;
import lejos.nxt.UltrasonicSensor;
import lejos.robotics.navigation.TachoPilot;


public class TestSonar {	
	
	public static void main(String[] args) throws InterruptedException{
		UltrasonicSensor sensor= new UltrasonicSensor(SensorPort.S2) ;
		sensor.continuous();
		while(true){
			LCD.clearDisplay();
			LCD.drawString("afstand:" + sensor.getDistance(), 0, 0);
			Thread.sleep(200);
		}
	}


}
